package com.example.dtcloudalibabaconsumer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients  // 开启Feign客户端支持
public class DtCloudalibabaConsumerApplication {
    private static final Logger LOG = LoggerFactory.getLogger(DtCloudalibabaConsumerApplication.class);

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(DtCloudalibabaConsumerApplication.class);
        String[] activeProfiles = applicationContext.getEnvironment().getActiveProfiles();
        LOG.info("dt-cloudalibaba-consumer:9002 启动成功");
        for (String profile :activeProfiles) {
            LOG.info("当前使用的profile:"+profile);
        }
    }

}
